package com.yhb.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Order {
    private String id;
    private String userId;
    private BigDecimal amount;
    private Status status;
    private String goodId;
    private Long goodCount;
    private String goodName;
    private String goodAlbum;
    private Good.Type goodType;
    private Long vipDays;
    private Date createTime;
    private Date purchaseTime;
    private Date sendTime;

    private String addressId;
    private String addressName;
    private String addressMobile;
    private String addressArea;
    private String address;

    @JsonIgnore
    private String tradeNo;

    private String deliverCorpName; // 快递公司
    private String deliverTradeNo; // 快递单号

    public enum Status {
        COMMITTED, // 已提交
        PURCHASED, // 已支付
        SENT, // 已发货
    }

}
